<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class Search extends Model
{
    protected $primaryKey='id';
    protected $table='searchs';
    public $timestamps=true;

    /**
     * 设置自身维护字段为时间戳
     * @param \DateTime|int $value
     * @return false|int
     */
    public function fromDateTime($value){
        return strtotime(parent::fromDateTime($value));
    }

    protected $guarded = [
        'id'
    ];
    //
}
